- /* sxfbcos.cpp by K.Tsuru */
- // function ID 5201 BRADIX
- #ifndef SN_H
- #include "sn.h"
- #endif
- /**************
- SDecimal class
- cos x
- ****************/
- SDecimal Bcos(const SDouble& x){
- SDecimal r;
- SDouble y;
-
- int func = COS_CALC;
- int s = GetTriCalcMethod(x, y, &func);
- if(s == 0){
- r = y.Sign(5201); // y = -1, 0, 1
- // must return SDecimal object.
- x.upToTerm = 1;
- } else if(func == COS_CALC) r = BcosSeries(y);
- else r = BsinSeries(y);
-
- if(s < 0) r.ChangeSign(); // r = -r;
- return r;
- }
sxfbcos.cpp : last modifiled at 2015/12/15 13:58:25(523 bytes)
created at 2015/12/22 16:09:56
The creation time of this html file is 2017/10/27 15:45:59 (Fri Oct 27 15:45:59 2017).